This package provides a number of ggplot2 themes inspired by vaporwave, both a subgenre of electronic music and an art movement. Here’s a nice sampling here: link.
On the musical side it’s known for it’s appropriation of 1980’s and 1990’s elevator/lounge music along with the application of slowed-down chopped and screwed techniques, looping and other effects.
On the visual side it’s know for A E S T H E T I C S with fullwidth characters it’s satrical takes on consumer capitalism (.e.g the use wih Greco-Roman statues to signify the fall of capitalism), and other nostalgic or surrealist engagement with glitch art, anime, 3D-rendered objects and cyberpunk trope in it’s cover art and music videos.
Aesthetic, often stylized as a e s t h e t i c, refers to retro-inspired visual art and music associated with the vaporwave subculture, which typically include Japanese lettering and nostalgic themes from 1980s and 1990s computer operating systems and video game consoles. Additionally, the term is widely associated with the 2012 vaporwave song “リサフランク420 / 現代のコンピュー” by Macintosh Plus…
There are three theme-generating functions:
sets the plot theme to match the most recognized album cover in vaporwave, Vektroid’s Floral Shoppe released under the one-time pseudonym of Macintosh Plus.
new_retro() sets the plot theme to match the A E S T H E T I C of New Retro Wave.The jwz() function sets the plot theme to match the personal blog of the American programmer jwz.
James Werner Zawinski known as jwz was a programmer known for contributions to your parents browser (netscape yo!), Mozilla (firefox, etc.) and XEmacs. In 2000, Zawinski starred in the 60-minute-long PBS documentary “Code Rush”. The footage was taken during 1998 while Zawinski was still working for Netscape in which he is portrayed as a pivotal person in the company. In addition, he underlined his preference for the night scene which led him to buy a nightclub.
The colors for this theme were drawn from many vaporwave images; I selected those that worked well together for color and fill scales.
scales::show_col(vapoRwave:::floralShoppe_palette)scales::show_col(vapoRwave:::newRetro_palette)scales::show_col(vapoRwave:::jwz_palette)scales::show_col(vapoRwave:::hotlineBling_palette)scales::show_col(vapoRwave:::hyperBubble_palette)There was a matplotlib extension for python with a couple of vaporwave palettes I incorportaed as well
library(tidyverse)
#> ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
#> ✔ dplyr 1.1.4 ✔ readr 2.1.4
#> ✔ forcats 1.0.0 ✔ stringr 1.5.1
#> ✔ ggplot2 3.4.4 ✔ tibble 3.2.1
#> ✔ lubridate 1.9.3 ✔ tidyr 1.3.0
#> ✔ purrr 1.0.2
#> ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
#> ✖ dplyr::filter() masks stats::filter()
#> ✖ dplyr::lag() masks stats::lag()
#> ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(vapoRwave)
#> Scanning ttf files in /home/moldach/.fonts ...
#> Extracting .afm files from .ttf files...
#> /home/moldach/.fonts/PacFont_Good.ttf : PacFontGood already registered in fonts database. Skipping.
#> /home/moldach/.fonts/SFAlienEncounters-Italic.ttf : SFAlienEncounters-Italic already registered in fonts database. Skipping.
#> /home/moldach/.fonts/SFAlienEncounters.ttf : SFAlienEncounters already registered in fonts database. Skipping.
#> /home/moldach/.fonts/SFAlienEncountersSolid-Ital.ttf : SFAlienEncountersSolid-Italic already registered in fonts database. Skipping.
#> /home/moldach/.fonts/SFAlienEncountersSolid.ttf : SFAlienEncountersSolid already registered in fonts database. Skipping.
#> /home/moldach/.fonts/Streamster.ttf : Streamster already registered in fonts database. Skipping.
#> /home/moldach/.fonts/VCR_OSD_MONO_1.001.ttf : VCROSDMono already registered in fonts database. Skipping.
#> /home/moldach/.fonts/windows_command_prompt_0.ttf : Windows-Command-Prompt already registered in fonts database. Skipping.
#> Found FontName for 0 fonts.
#> Scanning afm files in /home/moldach/R/x86_64-pc-linux-gnu-library/4.1/extrafontdb/metrics
#> Fonts imported successfully.
library(extrafont)
#> Registering fonts with R# use palette_03
ggplot(mpg, aes(displ)) +
geom_histogram(aes(fill=class),
binwidth = .1,
col="black",
size=.1) + # change binwidth
labs(title="Floral Shoppe",
subtitle="Engine Displacement across Vehicle Classes") + floral_shoppe() + scale_fill_floralShoppe()
#> Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
#> ℹ Please use `linewidth` instead.
#> This warning is displayed once every 8 hours.
#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
#> generated.options(scipen=999) # turn-off scientific notation like 1e+48
data("midwest", package = "ggplot2")
ggplot(midwest, aes(x=area, y=poptotal)) +
geom_point(aes(col=state, size=popdensity)) +
geom_smooth(method="loess", se=F, color = "#FA5F70FF") +
xlim(c(0, 0.1)) +
ylim(c(0, 500000)) +
labs(subtitle="Area Vs Population",
y="Population",
x="Area",
title="New Retro Theme",
caption = "Source: midwest") +
new_retro() +
scale_colour_newRetro() +
guides(size = guide_legend(override.aes = list(colour = "#FA5F70FF")))
#> `geom_smooth()` using formula = 'y ~ x'
#> Warning: Removed 15 rows containing non-finite values (`stat_smooth()`).
#> Warning: Removed 15 rows containing missing values (`geom_point()`).ggplot(mpg, aes(class, cty)) +
geom_boxplot(aes(fill=factor(cyl))) +
theme(axis.text.x = element_text(angle=65, vjust=0.6)) +
labs(title="Box plot",
subtitle="City Mileage grouped by Class of vehicle",
caption="Source: mpg",
x="Class of Vehicle",
y="City Mileage") +
jwz() +
scale_fill_jwz()You will need to download the following ttf fonts to use this package. You can import them with the extrafont package.
To verify the installation of these font’s on your OS you can look for them with:
extrafont::fonts()The above installations wil give you the following fonts
SF Alien EncountersSF Alien Encounters SolidVCR OSD MonoOCR A ExtendedWindows Command PromptBlade Runner Movie FontStreamsterThat being said you can use any ttf font with the vapoRwave package.
var <- mpg$class # the categorical data
## Prep data (nothing to change here)
nrows <- 10
df <- expand.grid(y = 1:nrows, x = 1:nrows)
categ_table <- round(table(var) * ((nrows*nrows)/(length(var))))
categ_table
#> var
#> 2seater compact midsize minivan pickup subcompact suv
#> 2 20 18 5 14 15 26
#> 2seater compact midsize minivan pickup subcompact suv
#> 2 20 18 5 14 15 26
df$category <- factor(rep(names(categ_table), categ_table))
# NOTE: if sum(categ_table) is not 100 (i.e. nrows^2), it will need adjustment to make the sum to 100.
## Plot
ggplot(df, aes(x = x, y = y, fill = category)) +
geom_tile(color = "black", size = 0.5) +
scale_x_continuous(expand = c(0, 0)) +
scale_y_continuous(expand = c(0, 0), trans = 'reverse') +
scale_fill_newRetro() +
labs(title="Waffle Chart", subtitle="'Class' of vehicles",
caption="Source: mpg") + new_retro(font = "SF Alien Encounters Solid", main.text.color = "pink")library(gapminder)
ggplot(filter(gapminder, year == 2007), aes(x = gdpPercap, y = lifeExp)) +
scale_x_log10(labels = scales::dollar) +
geom_point(aes(size = pop, fill = continent), shape = 21, colour = "white", alpha = 0.6) +
scale_size_continuous(range = c(1, 20)) +
labs(title = "",
subtitle = "Relationship between life expectancy and income, 2007",
caption = "Source: Gapminder.org | @traffordDataLab",
x = "GDP per capita ($)",
y = "Age (years)") +
guides(size = FALSE) +
jwz(font = "Streamster", main.text.color = "#FFCCFF", sub.text.color = "#CCFFFF", subtitle.size = 16) + scale_fill_hyperBubble()
#> Warning: The `<scale>` argument of `guides()` cannot be `FALSE`. Use "none" instead as
#> of ggplot2 3.3.4.
#> This warning is displayed once every 8 hours.
#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
#> generated.You are able to change most ggplot2::theme() elements from new_retro(), floral_shoppe() and jwz() themes.
df <- gapminder %>%
filter(country %in% c("France", "Germany", "Ireland", "Italy")) %>%
mutate(year = as.Date(paste(year, "-01-01", sep = "", format='%Y-%b-%d')))
ggplot(df, aes(x = year, y = gdpPercap, fill = country)) +
geom_area(alpha = 0.4) +
scale_x_date(breaks = df$year, date_labels = "%Y") +
scale_y_continuous(expand = c(0, 0), labels = scales::dollar) +
labs(title = "",
subtitle = "GDP per capita by country, 1952-2007",
caption = "Source: Gapminder.org | @traffordDataLab",
x = NULL,
y = "GDP per capita ($)",
fill = NULL) +
floral_shoppe(main.text.color = "black", font = "OCR A Extended", legend.position = "bottom") +
scale_fill_newRetro()library(forecast)
#> Registered S3 method overwritten by 'quantmod':
#> method from
#> as.zoo.data.frame zoo
# Subset data
nottem_small <- window(nottem, start=c(1920, 1), end=c(1925, 12)) # subset a smaller timewindow
# Plot (capital "B" is the Blade Runner guy)
ggseasonplot(nottem_small) + labs(title="Seasonal B plot:", subtitle = "Air temperatures at Nottingham Castle") + scale_colour_jwz() + new_retro(font = "Blade Runner Movie Font")vapoRwave also works with ggplot2 extensions.
library(ggcorrplot)
mydata <- mtcars[, c(1,3,4,5,6,7)]
corr <- round(cor(mydata),1)
ggcorrplot(corr, hc.order = T,
type = 'lower',
outline.color = 'white',
ggtheme = ggplot2::theme_bw,
colors = c('#79ADDC', 'white', '#CC7E85'),
lab = T) + floral_shoppe()library(WVPlots)
#> Loading required package: wrapr
#>
#> Attaching package: 'wrapr'
#> The following object is masked from 'package:dplyr':
#>
#> coalesce
#> The following objects are masked from 'package:tidyr':
#>
#> pack, unpack
#> The following object is masked from 'package:tibble':
#>
#> view
PairPlot(iris,
colnames(iris)[1:4],
"Anderson's Iris Data -- 3 species",
group_var = "Species") +
labs(caption = "Source: https://bit.ly/2N7tudH") +
jwz() +
scale_colour_hotlineBling()
#> Scale for colour is already present.
#> Adding another scale for colour, which will replace the existing scale.If you need to use a color gradient take a look at the html color codes for the palette in the Readme_files folder and insert your choice in low and high.
ggplot(faithful, aes(x = eruptions, y = waiting)) +
geom_point() + stat_density_2d(aes(fill = ..level..), geom = "polygon") +
jwz() +
scale_fill_gradient(low = "#55FFFF", high = "#8B2E8B")
#> Warning: The dot-dot notation (`..level..`) was deprecated in ggplot2 3.4.0.
#> ℹ Please use `after_stat(level)` instead.
#> This warning is displayed once every 8 hours.
#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
#> generated.